package cn.tedu.boke.portal.mapper;

import cn.tedu.boke.portal.model.Collection;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 收藏 Mapper 接口
 * </p>
 *
 * @author tedu.cn
 * @since 2021-11-04
 */
@Repository
public interface CollectionMapper extends BaseMapper<Collection>
{
    @Select("SELECT COUNT(post_id) FROM collection WHERE post_id=#{id}")
    int collectionnum(Integer id);
}
